import type { RouteParams, LocationQuery } from 'vue-router'
import { isNoNull } from 'usuuu'

/**
 * 获取路由信息
 */
export const useRots = async (params: RouteParams, query: LocationQuery) => {
    const paramsId = useParamsId()
    const pageNum = usePageNum()
    const queryId = useQueryId()
    if (isNoNull(params.id)) {
        paramsId.value = params.id as  string
    }
    pageNum.value = query.page as unknown as number
    queryId.value = query.id as string
}